package com.smartfast4j.manager.modules.schedule.service.impl;

import com.smartfast4j.manager.modules.schedule.service.ScheduleJobLogService;
import com.smartfast4j.mapper.schedule.ScheduleJobLogMapper;
import com.smartfast4j.pojo.schedule.ScheduleJobLog;
import com.smartfast4j.pojo.schedule.ScheduleJobLogExample;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ScheduleJobLogServiceImpl implements ScheduleJobLogService {
    @Autowired
    private ScheduleJobLogMapper scheduleJobLogMapper;

    private static final Logger logger = LoggerFactory.getLogger(ScheduleJobLogServiceImpl.class);

    public int countByExample(ScheduleJobLogExample example) {
        int count = this.scheduleJobLogMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public ScheduleJobLog selectByPrimaryKey(Long logId) {
        return this.scheduleJobLogMapper.selectByPrimaryKey(logId);
    }

    public List<ScheduleJobLog> selectByExample(ScheduleJobLogExample example) {
        return this.scheduleJobLogMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Long logId) {
        return this.scheduleJobLogMapper.deleteByPrimaryKey(logId);
    }

    public int updateByPrimaryKeySelective(ScheduleJobLog record) {
        return this.scheduleJobLogMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(ScheduleJobLog record) {
        return this.scheduleJobLogMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(ScheduleJobLogExample example) {
        return this.scheduleJobLogMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(ScheduleJobLog record, ScheduleJobLogExample example) {
        return this.scheduleJobLogMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(ScheduleJobLog record, ScheduleJobLogExample example) {
        return this.scheduleJobLogMapper.updateByExample(record, example);
    }

    public int insert(ScheduleJobLog record) {
        return this.scheduleJobLogMapper.insert(record);
    }

    public int insertSelective(ScheduleJobLog record) {
        return this.scheduleJobLogMapper.insertSelective(record);
    }

    public int insertBatchSelective(List<ScheduleJobLog> records) {
        return this.scheduleJobLogMapper.insertBatchSelective(records);
    }

    public int updateBatchByPrimaryKeySelective(List<ScheduleJobLog> records) {
        return this.scheduleJobLogMapper.updateBatchByPrimaryKeySelective(records);
    }
}